﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.IO;
namespace ModelTest
{
    public class FileOperate
    {
        static string filename = "E:\\log.txt";
        public static void TestOne()
        {
            //一行一行添加数据，先入后出
            StreamWriter writer = new StreamWriter(filename);
          // writer.Write();
        }

        public static void WriteOne()
        {
            FileStream fs = new FileStream(filename, FileMode.Append);
            fs.Seek(0, SeekOrigin.Begin);
            byte[] bytes = Encoding.UTF8.GetBytes("张三丰3");
            fs.Write(bytes, 0, bytes.Length);
            fs.Close();
        }

        public static void ReadOne()
        {
            // StreamReader reader = new StreamReader();
            //FileStream stream = new FileStream(filename);
        }


    }
}
